package elitech.vietnam.myfashion.view;

import java.util.Locale;

import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.TextView;
import elitech.vietnam.myfashion.MainActivity;
import elitech.vietnam.myfashion.R;
import elitech.vietnam.myfashion.entites.Category;

public class ItemSubView extends LinearLayout{
	
	private TextView mTxtTitle;
	
	public ItemSubView(MainActivity context, Category category) {
		super(context);
		LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		if(inflater != null){
            inflater.inflate(R.layout.item_sub, this);
        }
		
		mTxtTitle = (TextView) findViewById(R.id.itemsub_name);

		if(context.getLocale().equals(Locale.ENGLISH))
			mTxtTitle.setText(category.NameEN);
		else if(context.getLocale().equals(Locale.KOREA))
			mTxtTitle.setText(category.NameKR);
		else
			mTxtTitle.setText(category.NameVN);
		
		mTxtTitle.setTextColor(Color.GRAY);
		
	}
}
